function testButtonBasic() {	
	var btn = new zxt.ui.Button("mylabel", "myname");
	assertEquals("", "mylabel", btn.label());	
};

function testButtonRender() {
	var test = 0;
		
	var btn = new zxt.ui.Button("mylabel", "myname");
	btn.onClick = function(){ test = 1; };
	var dom = btn.render();
	
	$(">input", dom ).click();
	assertEquals("", 1, test);	
};

function testButtonDisplay() {
	var btn = new zxt.ui.Button("mylabel", "myname");
	var dom = btn.render();
	
	var disprop = $(">input", dom ).css("display")
	assertEquals("", "inline", disprop);	
	btn.setDisplay(false);		
	disprop = $(">input", dom ).css("display")
	assertEquals("", "none", disprop);
		
	btn.setDisplay(true);
	disprop = $(">input", dom ).css("display")
	assertEquals("", "inline", disprop);	
};

function testButtonEnable() {
	var btn = new zxt.ui.Button("mylabel", "myname");
	var dom = btn.render();
	
	var prop = $(">input", dom ).attr("disabled");
	assertEquals("", undefined, prop);	
	
	btn.setEnable(false);
	prop = $(">input", dom ).attr("disabled");
	assertEquals("", true, prop);	
	
	btn.setEnable(true);
	prop = $(">input", dom ).attr("disabled");
	assertEquals("", undefined, prop);	
	
};

function testLabelRender() {
	var label = new zxt.ui.Label();
	label.setValue("helloworld");
	
	var dom = label.render();
	var display = $(dom).html();
	assertEquals("", "helloworld", display);	
	
	
}	


function testColumnInteractor(){
	
	var col = new zxt.data.ColumnMeta("id", "ID", "ID", "text", true, false);
	var colInteractor = new zxt.ui.ColumnInteractor(col);	
	assertEquals("", $zxt.Mode.VIEW, colInteractor.mode());
	
	var colInteractor = new zxt.ui.ColumnInteractor(col);	
	assertEquals("", $zxt.Mode.VIEW, colInteractor.mode());
	
	colInteractor.mode($zxt.Mode.EDIT);
	assertEquals("", $zxt.Mode.EDIT, colInteractor.mode());
	
}	

function testColumnInteractor$OnMessage(){
	
	var col = new zxt.data.ColumnMeta("id", "ID", "ID", "text", true, false);
	var colInteractor = new zxt.ui.ColumnInteractor(col);	
	
	assertEquals("", $zxt.Mode.VIEW, colInteractor.mode());
	var rendered = false;
	colInteractor.render = function(){ rendered = true };
	
	var msg = new zxt.core.Message($zxt.MESSAGE.WM_MODE_CHANGE, {mode:$zxt.Mode.CRET});	
	colInteractor.onMessage(msg);	
	
	assertEquals("", $zxt.Mode.CRET, colInteractor.mode());
	assertTrue("", rendered);
	
}	

function testColumnInteractor$Render(){
	
	
}	